<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
</head>
<body>
    <h1>history</h1>
    <hr>

    <button onclick="history.back()">上一页</button>
    <button onclick="history.forward()">下一页</button>

    <button onclick="history.go(-1)">上一页</button>

    <button onclick="history.go(-2)">上两页</button>

    <script>
        console.dir(history.length);
    </script>
</body>
</html>
